import { request } from '../http';

const tableName = 'dayBooks';

export const dayBooksApi = {
  list(params: any) {
    return request.get(`/admin/${tableName}`, params);
  },
  detail(id: string | any) {
    return request.delete(`/admin/${tableName}/${id}`);
  },
  add(params: any) {
    return request.post(`/admin/${tableName}`, params);
  },
  update(params: any,) {
    return request.put(`/admin/${tableName}/${params.id}`, params);
  },
  delete(id: string | any) {
    return request.delete(`/admin/${tableName}/${id}`);
  },
  remove(ids: any[]) {
    return request.post(`/admin/${tableName}/remove`, ids);
  }
}